package com.gs.netty.websocket.remoting.req;


import com.gs.netty.websocket.remoting.WebSocketInvocation;
import com.gs.netty.websocket.remoting.resp.AppResponse;
import com.gs.netty.websocket.remoting.resp.SocketResponse;

public class NativeWebSocketRequest implements Request {

    private SocketRequest webSocketRequest;

    protected SocketResponse webSocketResponse;

    public NativeWebSocketRequest(SocketRequest webSocketRequest, SocketResponse webSocketResponse) {
        this.webSocketRequest = webSocketRequest;
        this.webSocketResponse = webSocketResponse;
    }



    @Override
    public Integer getRequestId() {
        return webSocketRequest.getRequestId();
    }

    public SocketResponse getNativeResponse() {
        return webSocketResponse;
    }

    public SocketRequest getNativeRequest() {
        return webSocketRequest;
    }

    @Override
    public String getCommand() {
        return webSocketRequest.getCommand();
    }

    @Override
    public String getPayload() {
        return webSocketRequest.getPayload();
    }

    public WebSocketInvocation createResponse() {
        return (WebSocketInvocation) webSocketRequest.createResponse();
    }
}
